package com.cm.structural.decorator;

/**
 * 来电显示装饰器
 * @author cm.g
 * @date 2023/9/9 16:59
 */
public class CallerIdBusinessDecorator extends SimBusinessDecorator{
    /**
     * 构造方法示例化具体构建对象
     *
     * @param simCard 抽象构建
     */
    public CallerIdBusinessDecorator(SimCard simCard) {
        super(simCard);
    }
    private void callerId() {
        System.out.println("增加来电显示功能");
    }
    @Override
    public void addAdditionalBusiness() {
        super.addAdditionalBusiness();
        // 对手机卡进行装饰，增加来电显示功能的额外行为
        callerId();
    }
}
